import request from '@/utils/request'

// 登陆接口
export function login(params) {
  return request({
    url: '/login',
    method: 'post',
    data: params
  })
}

// 获取公司基本信息
export function getCompanyInfo(data) {
  return request({
    url: '/company/details',
    method: 'post',
    data
  })
}

// 更新公司基本信息
export function updageCompanyInfo(data) {
  return request({
    url: '/company/update',
    method: 'post',
    data
  })
}


// 附件上传
export function uploadFile(data, params = {}) {
  return request({
    url: '/file/upload',
    method: 'post',
    data,
    params
  })
}
// 图片排序
export function fileSort(data, params = {}) {
  return request({
    url: '/file/sort',
    method: 'post',
    data,
    params
  })
}
// 删除图片
export function deleteFile(data, params = {}) {
  return request({
    url: '/file/delete',
    method: 'post',
    data,
    params
  })
}

// 用户信息分页查询
export function userList(data) {
  return request({
    url: '/user/page',
    method: 'post',
    data,
  })
}
// 新用户信息添加
export function addUser(data) {
  return request({
    url: '/user/add',
    method: 'post',
    data,
  })
}
// 编辑用户
export function updateUser(data) {
  return request({
    url: '/user/update',
    method: 'post',
    data,
  })
}
// 删除用户
export function deleteUser(data) {
  return request({
    url: '/user/delete',
    method: 'post',
    data,
  })
}

// 10、用户信息详情(后台接口,小程序接口)
export function userDetails(data) {
  return request({
    url: '/user/details',
    method: 'post',
    params:data,
  })
}
// 视频上传
export function uploadVideoFile(data, params = {}) {
  return request({
    url: '/video/upload',
    method: 'post',
    data,
    params
  })
}
